package com.fastjars.framework.pojo;

import com.alibaba.fastjson.JSONObject;
import com.fastjars.framework.json.ToJson;

import java.io.Serializable;

/**
 * BasePojo
 *
 * @author Brant Liu <br> 邮箱：<br>lbf1988@qq.com <br>日期：<br>2018/2/10
 * @version 1.0.0
 */
public abstract class BasePojo<ID extends Serializable> implements ToJson,Serializable{
    private ID id;

    public ID getId() {
        return id;
    }

    public void setId(ID id) {
        this.id = id;
    }

    @Override
    public String toJsonString() {
        return JSONObject.toJSONString(this);
    }
}
